package com.ser01;

import javax.servlet.*;
import java.io.IOException;

public class ServletDemo4 implements Servlet {

    public ServletDemo4() {
        System.out.println("ServletDemo4的构造方法");
    }

    @Override
    public void init(ServletConfig servletConfig) throws ServletException {
        //获取xml中配置参数的数据
        String value = servletConfig.getInitParameter("name");
        System.out.println("ServletDemo4...init初始化..." + value);
    }

    @Override
    public void service(ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, IOException {
        System.out.println("ServletDemo4...service执行方法...");
    }

    @Override
    public void destroy() {
        System.out.println("ServletDemo4...destroy销毁方法...");
    }

    @Override
    public ServletConfig getServletConfig() {
        return null;
    }

    @Override
    public String getServletInfo() {
        return null;
    }
}
